package com.ibeeking.found.auth.api.feign;

import com.ibeeking.found.auth.api.common.dto.LoginUserDTO;
import com.ibeeking.found.auth.api.common.query.AccountLoginQuery;
import com.ibeeking.found.auth.api.feign.fallback.ShopLoginFallbackFactory;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author ibeeking
 */
@FeignClient(name = "base-upms-s-server", contextId = "shopLoginClient", path = "/b", fallbackFactory = ShopLoginFallbackFactory.class, decode404 = true)
public interface ShopLoginClient {

    /**
     * 商户端登录
     *
     * @param query
     * @return
     */
    @PostMapping(value = "/user/feign/v1/queryAccountLogin")
    ResponseResult<LoginUserDTO> queryAccountLogin(@RequestBody AccountLoginQuery query);

    @PostMapping(value = "/user/feign/v1/queryHaveShopId")
    ResponseResult<List<Long>> queryHaveShopId();
}
